package com.zkzx.common.truck.constants;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.springframework.util.StringUtils;

import java.util.Objects;

/**
 * @author young Email:yanghui@zkraising.com
 * @description 车辆类型 网货为准
 * @company 北京中科智兴物联科技有限公司 @版权所有
 * @since 2021年05月10日 15时15分
 */
@Getter
@AllArgsConstructor
public enum VehicleEnum {

    H11 ("H11","重型普通货车"),
    H12 ("H12","重型厢式货车"),
    H13 ("H13","重型封闭货车"),
    H14 ("H14","重型罐式货车"),
    H15 ("H15","重型平板货车"),
    H16 ("H16","重型集装厢车"),
    H17 ("H17","重型自卸货车"),
    H18 ("H18","重型特殊结构货车"),
    H19 ("H19","重型仓栅式货车"),
    H21 ("H21","中型普通货车"),
    H22 ("H22","中型厢式货车"),
    H23 ("H23","中型封闭货车"),
    H24 ("H24","中型罐式货车"),
    H25 ("H25","中型平板货车"),
    H26 ("H26","中型集装厢车"),
    H27 ("H27","中型自卸货车"),
    H28 ("H28","中型特殊结构货车"),
    H29 ("H29","中型仓栅式货车"),
    H31 ("H31","轻型普通货车"),
    H32 ("H32","轻型厢式货车"),
    H33 ("H33","轻型封闭货车"),
    H34 ("H34","轻型罐式货车"),
    H35 ("H35","轻型平板货车"),
    H37 ("H37","轻型自卸货车"),
    H38 ("H38","轻型特殊结构货车"),
    H39 ("H39","轻型仓栅式货车"),
    H41 ("H41","微型普通货车"),
    H42 ("H42","微型厢式货车"),
    H43 ("H43","微型封闭货车"),
    H44 ("H44","微型罐式货车"),
    H45 ("H45","微型自卸货车"),
    H46 ("H46","微型特殊结构货车"),
    H47 ("H47","微型仓栅式货车"),
    H51 ("H51","普通低速货车"),
    H52 ("H52","厢式低速货车"),
    H53 ("H53","罐式低速货车"),
    H54 ("H54","自卸低速货车"),
    H55 ("H55","仓栅式低速货车"),
    Q11 ("Q11","重型半挂牵引车"),
    Q12 ("Q12","重型全挂牵引车"),
    Q21 ("Q21","中型半挂牵引车"),
    Q22 ("Q22","中型全挂牵引车"),
    Q31 ("Q31","轻型半挂牵引车"),
    Q32 ("Q32","轻型全挂牵引车"),
    G11 ("G11","重型普通全挂车"),
    G12 ("G12","重型厢式全挂车"),
    G13 ("G13","重型罐式全挂车"),
    G14 ("G14","重型平板全挂车"),
    G15 ("G15","重型集装箱全挂车"),
    G16 ("G16","重型自卸全挂车"),
    G17 ("G17","重型仓栅式全挂车"),
    G18 ("G18","重型旅居全挂车"),
    G19 ("G19","重型专项作业全挂车"),
    G21 ("G21","中型普通全挂车"),
    G22 ("G22","中型厢式全挂车"),
    G23 ("G23","中型罐式全挂车"),
    G24 ("G24","中型平板全挂车"),
    G25 ("G25","中型集装箱全挂车"),
    G26 ("G26","中型自卸全挂车"),
    G27 ("G27","中型仓栅式全挂车"),
    G28 ("G28","中型旅居全挂车"),
    G29 ("G29","中型专项作业全挂车"),
    G31 ("G31","轻型普通全挂车"),
    G32 ("G32","轻型厢式全挂车"),
    G33 ("G33","轻型罐式全挂车"),
    G34 ("G34","轻型平板全挂车"),
    G35 ("G35","轻型自卸全挂车"),
    G36 ("G36","轻型仓栅式全挂车"),
    G37 ("G37","轻型旅居全挂车"),
    G38 ("G38","轻型专项作业全挂车"),
    B11 ("B11","重型普通半挂车"),
    B12 ("B12","重型厢式半挂车"),
    B13 ("B13","重型罐式半挂车"),
    B14 ("B14","重型平板半挂车"),
    B15 ("B15","重型集装箱半挂车"),
    B16 ("B16","重型自卸半挂车"),
    B17 ("B17","重型特殊结构半挂车"),
    B18 ("B18","重型仓栅式半挂车"),
    B19 ("B19","重型旅居半挂车"),
    B1A ("B1A","重型专项作业半挂车"),
    B1B ("B1B","重型低平板半挂车"),
    B21 ("B21","中型普通半挂车"),
    B22 ("B22","中型厢式半挂车"),
    B23 ("B23","中型罐式半挂车"),
    B24 ("B24","中型平板半挂车"),
    B25 ("B25","中型集装箱半挂车"),
    B26 ("B26","中型自卸半挂车"),
    B27 ("B27","中型特殊结构半挂车"),
    B28 ("B28","中型仓栅式半挂车"),
    B29 ("B29","中型旅居半挂车"),
    B2A ("B2A","中型专项作业半挂车"),
    B2B ("B2B","中型低平板半挂车"),
    B31 ("B31","轻型普通半挂车"),
    B32 ("B32","轻型厢式半挂车"),
    B33 ("B33","轻型罐式半挂车"),
    B34 ("B34","轻型平板半挂车"),
    B35 ("B35","轻型自卸半挂车"),
    B36 ("B36","轻型仓栅式半挂车"),
    B37 ("B37","轻型旅居半挂车"),
    B38 ("B38","轻型专项作业半挂车"),
    B39 ("B39","轻型低平板半挂车"),
    X99 ("X99","其他");

    private String code;

    private String value;


    /**
     *  获取name
     * @param name 枚举值
     * @return 枚举名
     */
    public static String getName(String name){
        if(StringUtils.isEmpty(name)){
            return null;
        }
        return VehicleEnum.valueOf(name).name();
    }

    /**
     * 获取value
     * @param name 枚举值
     * @return 枚举简介
     */
    public static  String getValue(String name){
        if(StringUtils.isEmpty(name)){
            return null;
        }
        return VehicleEnum.valueOf(name).value;
    }
}
